package org.dcm4che3.tool.printscp;

import java.io.IOException;

import org.dcm4che3.data.Attributes;
import org.dcm4che3.data.Tag;
import org.dcm4che3.data.UID;
import org.dcm4che3.data.VR;
import org.dcm4che3.net.Association;
import org.dcm4che3.net.Commands;
import org.dcm4che3.net.Dimse;
import org.dcm4che3.net.Status;
import org.dcm4che3.net.pdu.PresentationContext;
import org.dcm4che3.net.service.AbstractDicomService;
import org.dcm4che3.net.service.DicomServiceException;

public class FilmRetrievalService extends AbstractDicomService {

	public FilmRetrievalService() {
		super(UID.PrinterConfigurationRetrievalSOPClass);
	}
	
	@Override
	protected void onDimseRQ(Association as, PresentationContext pc, Dimse dimse, Attributes cmd, Attributes data)
			throws IOException {
		switch (dimse) {
        case N_GET_RQ:
            onNGetRQ(as, pc, cmd, data);
            break;
        default:
            throw new DicomServiceException(Status.UnrecognizedOperation);
        }
	}
	
	 protected void onNGetRQ(Association as, PresentationContext pc,
	            Attributes rq, Attributes rqAttrs) throws IOException {
        Attributes rsp = Commands.mkNGetRSP(rq, Status.Success);
        Attributes rspAttrs = create(as, rq, rqAttrs, rsp);
        as.tryWriteDimseRSP(pc, rsp, rspAttrs);
    }

    protected Attributes create(Association as, Attributes rq,
            Attributes rqAttrs, Attributes rsp) throws DicomServiceException {
    	return null;
    }
	
}
